﻿namespace checc_baseTools
{

    public class CheccWingWallData 
    {
        //总体 
        private double slope_subgrade = 1.5;                                     //路基边坡坡度(1:m) //路基边坡坡度(1:m) 
        //铺砌
        private double paveSlope = 0.03;                                         //左洞洞口铺砌坡度:向外方向下坡为正 上坡为负, 坡度值为沿着涵洞轴线方向
        private double thickness_pave = 40/* * 100*/;                                       //铺砌厚度(m) 
        private double paveOffset = 200/* * 100*/;                                           //左洞铺砌外延(m)
        //截水墙
        private double h_CutoffWall = 120/* * 100*/;                                         //截水墙高（含铺砌高度）(m)
        private double w_CutoffWall = 40/* * 100*/;                                         //截水墙厚(m)

        //两侧八字墙净距
        private double distance_W = 200/* * 100*/;                                             //左洞两侧八字墙最高截面处沿桩号的净距//净跨
        private double distance_H = 200/* * 100*/;                                             //右洞两侧八字墙最高截面处沿桩号的净距  //净高
        //八字墙内侧底部边缘线与道路法线的夹角(°) 
        private double angle_Favorable = 30;                                            //顺翼墙外偏角
        private double angle_Opposite = 30;                                            //逆翼墙外偏角

        //八字墙构造参数
        private double w_topWall = 55/* * 100*/;                                           //八字墙顶宽a(m)
        private double h_min = 40/* * 100*/;                                               //八字墙最低截面高度h(m)
        //八字墙基础
        private double w_innerEdge = 50/* * 100*/;                                          //基础内侧襟边e1(m)
        private double w_outerEdge = 20/* * 100*/;                                          //基础外侧襟边e2(m)
        private double slope_outerVerticalWall = 3.5/* * 100*/;                             //翼墙垂直背坡(n:1) 
        private double foundationThickness = 60/* * 100*/;                                  //翼墙基础厚度d(m)
        private double burialDepth = 100/* * 100*/;                                              //基础入土深度h(cm)

        
        public double Slope_subgrade
        {
            get { return slope_subgrade; }
            set { slope_subgrade = value; }
        }
        public double PaveSlope
        {
            get { return paveSlope; }
            set { paveSlope = value; }
        }
        public double Thickness_pave
        {
            get { return thickness_pave; }
            set { thickness_pave = value; }
        }
        public double PaveOffset
        {
            get { return paveOffset; }
            set { paveOffset = value; }
        }
        public double BurialDepth
        {
            get { return burialDepth; }
            set { burialDepth = value; }
        }

        public double H_CutoffWall
        {
            get { return h_CutoffWall; }
            set { h_CutoffWall = value; }
        }
        public double W_CutoffWall
        {
            get { return w_CutoffWall; }
            set { w_CutoffWall = value; }
        }

        public double Distance_W
        {
            get { return distance_W; }
            set { distance_W = value; }
        }
        public double Distance_H
        {
            get { return distance_H; }
            set { distance_H = value; }
        }

        public double Angle_Favorable
        {
            get { return angle_Favorable; }
            set { angle_Favorable = value; }
        }

        public double Angle_Opposite
        {
            get { return angle_Opposite; }
            set { angle_Opposite = value; }
        }

        public double W_topWall
        {
            get { return w_topWall; }
            set { w_topWall = value; }
        }
        public double H_min
        {
            get { return h_min; }
            set { h_min = value; }
        }
        public double W_innerEdge
        {
            get { return w_innerEdge; }
            set { w_innerEdge = value; }
        }
        public double W_outerEdge
        {
            get { return w_outerEdge; }
            set { w_outerEdge = value; }
        }
        public double Slope_outerVerticalWall
        {
            get { return slope_outerVerticalWall; }
            set { slope_outerVerticalWall = value; }
        }
        public double FoundationThickness
        {
            get { return foundationThickness; }
            set { foundationThickness = value; }
        }

        public CheccWingWallData() { }

        /// <summary>
        /// 初始化八字墙
        /// </summary>
        /// <param name="Slope_subgrade">路基边坡坡度(1:m)</param>
        /// <param name="PaveSlope">铺砌坡度</param>
        /// <param name="Thickness_pave">铺砌厚度</param>
        /// <param name="PaveOffset">铺砌外延</param>
        /// <param name="BurialDepth">基础入土深度h</param>
        /// <param name="H_CutoffWall">截水墙高（含铺砌高度）</param>
        /// <param name="W_CutoffWall">截水墙厚</param>
        /// <param name="Distance_W">净跨</param>
        /// <param name="Distance_H">净高</param>
        /// <param name="Angle_Favorable">顺翼墙外偏角</param>
        /// <param name="Angle_Opposite">逆翼墙外偏角</param>
        /// <param name="W_topWall">八字墙顶宽a(m)</param>
        /// <param name="H_min">八字墙最低截面高度h(m)</param>
        /// <param name="W_innerEdge">基础内侧襟边e1(m)</param>
        /// <param name="W_outerEdge">基础外侧襟边e2(m)</param>
        /// <param name="Slope_outerVerticalWall">翼墙垂直背坡(n:1)</param>
        /// <param name="FoundationThickness">翼墙基础厚度d(m)</param>
        public CheccWingWallData(double Slope_subgrade, double PaveSlope, double Thickness_pave, double PaveOffset, double BurialDepth,
            double H_CutoffWall, double W_CutoffWall, double Distance_W, double Distance_H, double Angle_Favorable, double Angle_Opposite, double W_topWall, double H_min, double W_innerEdge,
            double W_outerEdge, double Slope_outerVerticalWall, double FoundationThickness)
        {
            slope_subgrade = Slope_subgrade;
            paveSlope = PaveSlope;
            thickness_pave = Thickness_pave;
            paveOffset = PaveOffset;
            burialDepth = BurialDepth;
            h_CutoffWall = H_CutoffWall;
            w_CutoffWall = W_CutoffWall;
            distance_W = Distance_W;
            distance_H = Distance_H;
            angle_Favorable = Angle_Favorable;
            angle_Opposite = Angle_Opposite;
            w_topWall = W_topWall;
            h_min = H_min;
            w_innerEdge = W_innerEdge;
            w_outerEdge = W_outerEdge;
            slope_outerVerticalWall = Slope_outerVerticalWall;
            foundationThickness = FoundationThickness;
        }
        
        //public BIMBaseCS.Core.BPGraphics createGraphics(BIMBaseCS.Core.BPModel model)
        //{
        //    return _createGraphics(model);
        //}

        //protected override BPGraphics _createGraphics(BPModel model)
        //{
        //    BPGraphics graphic1Right = new BPGraphics(model);
        //    Slope_subgrade = Slope_subgrade;                                                         //路基边坡坡度(1:m) //路基边坡坡度(1:m) 
        //    PaveSlope = PaveSlope;                                                                   //左洞洞口铺砌坡度:向外方向下坡为正 上坡为负, 坡度值为沿着涵洞轴线方向
        //    Thickness_pave = Thickness_pave * Culvert_Help.GeneralHelpers.UOR;                                               //铺砌厚度(m) 
        //    PaveOffset = PaveOffset * Culvert_Help.GeneralHelpers.UOR;                                                        //左洞铺砌外延(m)
        //    H_CutoffWall = H_CutoffWall * Culvert_Help.GeneralHelpers.UOR;                                                    //截水墙高（含铺砌高度）(m)
        //    W_CutoffWall = W_CutoffWall * Culvert_Help.GeneralHelpers.UOR;                                                   //截水墙厚(m)
        //    Distance_W = Distance_W / Math.Cos(Math.PI * 0 / 180) * Culvert_Help.GeneralHelpers.UOR;                        //左洞两侧八字墙最高截面处沿桩号的净距//净跨
        //    Distance_H = Distance_H * Culvert_Help.GeneralHelpers.UOR;                                                          //右洞两侧八字墙最高截面处沿桩号的净距  //净高
        //    Angle_Favorable = Angle_Favorable;                                         //顺翼墙外偏角
        //    Angle_Opposite = Angle_Opposite;                                          //逆翼墙外偏角
        //    W_topWall = W_topWall * Culvert_Help.GeneralHelpers.UOR;                                                        //八字墙顶宽a(m)
        //    H_min = H_min * Culvert_Help.GeneralHelpers.UOR;                                                                //八字墙最低截面高度h(m)
        //    W_innerEdge = W_innerEdge * Culvert_Help.GeneralHelpers.UOR;                                                     //基础内侧襟边e1(m)
        //    W_outerEdge = W_outerEdge * Culvert_Help.GeneralHelpers.UOR;                                                     //基础外侧襟边e2(m)
        //    Slope_outerVerticalWall = Slope_outerVerticalWall;                             //翼墙垂直背坡(n:1) 
        //    FoundationThickness = FoundationThickness * Culvert_Help.GeneralHelpers.UOR;                                     //翼墙基础厚度d(m)
        //    BurialDepth = BurialDepth * Culvert_Help.GeneralHelpers.UOR;                                                          //基础入土深度h(cm)

        //    //coverThickness = coverThickness * Culvert_Help.GeneralHelpers.UOR;
        //    //exceedsHeight = exceedsHeight * Culvert_Help.GeneralHelpers.UOR;

        //    //右侧翼墙基础最外侧两点
        //    Tuple<BPGraphics, List<GePoint3d>> right = CheccWingWall.CreateRightCulvert(new CheccWingWallData(), 0, 0);
        //    graphic1Right = right.Item1;

        //    //左侧翼墙基础最外侧两点
        //    Tuple<BPGraphics, List<GePoint3d>> left = CheccWingWall.CreateLeftCulvert(new CheccWingWallData(), 0, 0);
        //    BPGraphics graphic1Left = left.Item1;
           
        //    //铺砌截水墙
        //    BPGraphics bPGraphics = CheccWingWall.CreatePave(new CheccWingWallData(), right.Item2, left.Item2);
        //    //旋转洞口角度
        //    graphic1Right = Helper.unitRotation(graphic1Right, 0);
        //    graphic1Left = Helper.unitRotation(graphic1Left, 0);
        //    bPGraphics = Helper.unitRotation(bPGraphics, 0);
        //    List<BPGraphics> bPGraphics1 = new List<BPGraphics> { graphic1Right, graphic1Left, bPGraphics };
        //    return bPGraphics1[0];
        //    //return CheccWingWall.bPGraphics1[0];
        //}
    }
}
